package com.peanutplan.blog.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.peanutplan.blog.model.bo.ArchiveBo;
import com.peanutplan.blog.model.vo.ContentVo;
import com.peanutplan.blog.model.vo.ContentVoExample;

public interface ContentVoMapper {
    int countByExample(ContentVoExample example);

    int deleteByExample(ContentVoExample example);

    int deleteByPrimaryKey(Integer cid);

    int insert(ContentVo record);

    int insertSelective(ContentVo record);

    List<ContentVo> selectByExampleWithBLOBs(ContentVoExample example);

    List<ContentVo> selectByExample(ContentVoExample example);

    ContentVo selectByPrimaryKey(Integer cid);
    
    String selectTitleByPrimaryKey(Integer cid);

    int updateByExampleSelective(@Param("record") ContentVo record, @Param("example") ContentVoExample example);

    int updateByExampleWithBLOBs(@Param("record") ContentVo record, @Param("example") ContentVoExample example);

    int updateByExample(@Param("record") ContentVo record, @Param("example") ContentVoExample example);

    int updateByPrimaryKeySelective(ContentVo record);

    int updateByPrimaryKeyWithBLOBs(ContentVo record);

    int updateByPrimaryKey(ContentVo record);
    
    List<ArchiveBo> findReturnArchiveBo();

    List<ContentVo> findByCatalog(Integer mid);
    
    /**
     * 随机取
     * @param count
     * @return
     */
    List<ContentVo> selectRand(Integer count);
}